package eg.backend.domain.fly;

import eg.backend.util.Constants;

public class AggregatedRecord {
	private String displayName;
	/**
	 *  for dimension, it's the dimension item's id, Long type. for time, may
	 *  starts with a prefix TIME, followed by yyyyMMwwdd eg TIME2008090422,
	 *  means year 2008, month 09, week 04, and 22nd day of the month
	 *  
	 *  -1 means unsorted
	 */
	private String id;
	private double amount;

	public AggregatedRecord(){}

	public AggregatedRecord(String displayName, long id, double amount) {
		this(displayName, "" + id, amount);
	}
	public AggregatedRecord(String displayName, String id, double amount) {
		this.amount = amount;
		this.displayName = displayName;
		this.id = id;
	}

	public String getDisplayName() {
		return displayName;
	}

	public void setDisplayName(String displayName) {
		this.displayName = displayName;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getAmount() {
		return Constants.NUMBER_FORMAT.format(amount);
	}

	public void setAmount(double amount) {
		this.amount = amount;
	}
	
}
